import http from '@/utils/request'

export function getArticleInfo(id) {
    return async (dispatch) => {
      const res = await http.get(`/articles/${id}`)
      const info = res.data
      dispatch({
        type: 'article/setArticleInfo',
        payload: info
      })
    }
  }